Pattern matching applications are frequently characterized by the examination of a stream of symbols (typically characters) using one or more regular expressions. In such applications, a regular expression match causes the application to perform some operation. A representative example of such applications includes deep packet inspection. Deep packet inspection and other packet scanning can be important to network security.
In deep packet inspection, network traffic in-bound for a computer system is cleansed of computer viruses and other malware. Packet inspection can also be used to identify specific classes of applications and protocol definitions, among other things. By using regular expressions in deep packet inspection, rather than explicit string patterns, a packet scanner may be able to identify a large variety of patterns because of the flexibility and expressive power of regular expressions. However, conventional methods using regular expressions can also be much slower and more resource-intensive than explicit string patterns. Optimizing pattern matching systems for regular expressions may greatly improve speed and reduce memory consumption of regular expression searches.